package it.davial.mgwt.client.service;

import it.davial.mgwt.client.Area;
import it.davial.mgwt.client.Patient;
import it.davial.mgwt.client.Visit;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("db")
public interface DbService extends RemoteService {
  String greetServer(String name) throws IllegalArgumentException;
  
  java.util.List<Patient> getAllPatient();
  java.util.List<Patient> getFilteredPatient( String surname, String date );
  boolean savePatient( Patient patient ) throws Exception;
  boolean deletePatient( Patient patient ) throws Exception;

  java.util.List<Visit> getAllVisits();
  java.util.List<Visit> getFilteredVisits( String patientId, String date );
  boolean saveVisit( Visit patient ) throws Exception;
  boolean deleteVisit( Visit patient ) throws Exception;

  java.util.List<Area> findAreaById( int idFigure );

} 
